package com.controller;

import com.po.CustomerAccountPO;
import com.po.ProductPO;
import com.result.Result;
import com.service.CustomerAccountService;
import com.vo.CustomerAccountVO;
import com.vo.ProductVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: chihaojie
 * @Date: 2019/5/29 14:08
 * @Version 1.0
 * @Note
 */
@Api(value = "customerAccountApi")
@CrossOrigin
@RestController
@RequestMapping("/customerAccount")
public class CustomerAccountController {


    @Autowired
    private CustomerAccountService customerAccountService;

    @ApiOperation(value = "保存", httpMethod = "POST", notes = "保存")
    @RequestMapping(value = "/save", method = RequestMethod.POST,produces = "application/json;charset=utf-8")
    public Result<CustomerAccountVO> save(@RequestBody CustomerAccountPO  customerAccountPO) {
        return new Result<CustomerAccountVO>().ok(customerAccountService.save(customerAccountPO));
    }



}
